import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import Antd from 'ant-design-vue'
// import 'ant-design-vue/dist/antd.css' // 导入 antd 的样式文件
import 'ant-design-vue/dist/antd.less'
// import 'ant-design-vue/dist/antd.css'; // 导入 antd 的样式文件（如果使用 .css 文件）

import '@/assets/styles/main.scss'
import 'animate.css';

// svg图标
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/common/SvgIcon/index.vue'

// 公共组件
import Pagination from '@/components/common/Pagination.vue'
import GpuDrawer from '@/components/common/GpuDrawer.vue'

// 公共方法
import { handleImg } from '@/libs/util.common'

/** ********************** v-md-editor END ***************************************/

const app = createApp(App)
app.use(Antd)
app.use(createPinia())
app.use(router)

// 全局方法挂载
app.config.globalProperties.handleImg = handleImg

//  全局挂在的组件
app.component('Pagination', Pagination)
app.component('SvgIcon', SvgIcon)
app.component('GpuDrawer', GpuDrawer)

app.mount('#app')
